<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('入党积极分子列表')"/>
</head>
<body class="gray-bg">
    <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>学号：</label>
                                <input type="text" name="partyActivistsStuNum"/>
                            </li>
                            <li>
                                <label>姓名：</label>
                                <input type="text" name="partyActivistsName"/>
                            </li>
                            <li>
                                <label>班级：</label>
                                <input type="text" name="partyActivistsClass"/>
                            </li>
                            <li>
                                <label>性别：</label>
                                <select name="partyActivistsSex" th:with="type=${@dict.getType('sys_user_sex')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>民族：</label>
                                <input type="text" name="partyActivistsNation"/>
                            </li>
                            <li class="select-time">
                                <label>出生年月：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                       name="params[beginPartyActivistsBirthday]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                       name="params[endPartyActivistsBirthday]"/>
                            </li>
                            <li>
                                <label>籍贯：</label>
                                <input type="text" name="partyActivistsNativePlace"/>
                            </li>
                            <li class="select-time">
                                <label>入党申请书时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                       name="params[beginPartyActivistsApplicationForPartyMembershipTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                       name="params[endPartyActivistsApplicationForPartyMembershipTime]"/>
                            </li>
                            <li>
                                <label>自传：</label>
                                <select name="partyActivistsAutobiography"
                                        th:with="type=${@dict.getType('sys_party_info_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>《团员推优审批表》：</label>
                                <select name="partyActivistsApprovalForm"
                                        th:with="type=${@dict.getType('sys_party_info_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li class="select-time">
                                <label>确立积极分子日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                       name="params[beginPartyActivistsEstablishmentDate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                       name="params[endPartyActivistsEstablishmentDate]"/>
                            </li>
                            <li class="select-time">
                                <label>党校结业证书日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                       name="params[beginPartyActivistsClosingTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                       name="params[endPartyActivistsClosingTime]"/>
                            </li>
                            <li>
                                <label>思想汇报：</label>
                                <select name="partyActivistsThoughtReport"
                                        th:with="type=${@dict.getType('sys_party_info_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>积极分子考察表：</label>
                                <select name="partyActivistsSurveyTable"
                                        th:with="type=${@dict.getType('sys_party_info_status')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li class="select-time">
                                <label>确立发展对象日期：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间"
                                       name="params[beginPartyActivistsEstablishmentDateDev]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间"
                                       name="params[endPartyActivistsEstablishmentDateDev]"/>
                            </li>
                            <li>
                                <label>学生干部任职情况：</label>
                                <input type="text" name="partyActivistsPositionStuCadres"/>
                            </li>
                            <li>
                                <label>奖惩情况：</label>
                                <input type="text" name="partyActivistsRewardsPunishments"/>
                            </li>
                            <li>
                                <label>班主任：</label>
                                <input type="text" name="partyActivistsHeadmaster"/>
                            </li>
                            <li>
                                <label>联系方式：</label>
                                <input type="text" name="partyActivistsContactInformation"/>
                            </li>
                            <li>
                                <label>备注：</label>
                                <input type="text" name="partyActivistsRemarks"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                        class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                        class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="admin:activists:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()"
                   shiro:hasPermission="admin:activists:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"
                   shiro:hasPermission="admin:activists:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="admin:activists:import">
                    <i class="fa fa-upload"></i> 导入
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()"
                   shiro:hasPermission="admin:activists:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer"/>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('admin:activists:edit')}]];
        var removeFlag = [[${@permission.hasPermi('admin:activists:remove')}]];
        var partyActivistsSexDatas = [[${@dict.getType('sys_user_sex')}]];
        var partyActivistsAutobiographyDatas = [[${@dict.getType('sys_party_info_status')}]];
        var partyActivistsApprovalFormDatas = [[${@dict.getType('sys_party_info_status')}]];
        var partyActivistsThoughtReportDatas = [[${@dict.getType('sys_party_info_status')}]];
        var partyActivistsSurveyTableDatas = [[${@dict.getType('sys_party_info_status')}]];
        var prefix = ctx + "admin/activists";

        $(function () {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                importUrl: prefix + "/importData",
                importTemplateUrl: prefix + "/importTemplate",
                modalName: "入党积极分子",
                pagination: true,
                escape: false,
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'partyActivistsStuId',
                        title: '入党积极分子id',
                        visible: false
                    },
                    {
                        field: 'partyActivistsStuNum',
                        title: '学号'
                    },
                    {
                        field: 'partyActivistsName',
                        title: '姓名'
                    },
                    {
                        field: 'partyActivistsClass',
                        title: '班级'
                    },
                    {
                        field: 'partyActivistsSex',
                        title: '性别',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(partyActivistsSexDatas, value);
                        }
                    },
                    {
                        field: 'partyActivistsNation',
                        title: '民族'
                    },
                    {
	                    field: 'partyActivistsBirthday',
	                    title: '出生年月',
	                    formatter: function (value, row, index) {
		                    return changeDateFormat("yyyy-mm-dd", value);
	                    }
                    },
                    {
                        field: 'partyActivistsNativePlace',
                        title: '籍贯'
                    },
	                {
		                field: 'partyActivistsApplicationForPartyMembershipTime',
		                title: '入党申请书时间',
		                formatter: function (value, row, index) {
			                return changeDateFormat("yyyy-mm-dd", value);
		                }
	                },
                    {
                        field: 'partyActivistsAutobiography',
                        title: '自传',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(partyActivistsAutobiographyDatas, value);
                        }
                    },
                    {
                        field: 'partyActivistsApprovalForm',
                        title: '《团员推优审批表》',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(partyActivistsApprovalFormDatas, value);
                        }
                    },
	                {
		                field: 'partyActivistsEstablishmentDate',
		                title: '确立积极分子日期',
		                formatter: function (value, row, index) {
			                return changeDateFormat("yyyy-mm-dd", value);
		                }
	                },
	                {
		                field: 'partyActivistsClosingTime',
		                title: '党校结业证书日期',
		                formatter: function (value, row, index) {
			                return changeDateFormat("yyyy-mm-dd", value);
		                }
	                },
                    {
                        field: 'partyActivistsThoughtReport',
                        title: '思想汇报',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(partyActivistsThoughtReportDatas, value);
                        }
                    },
                    {
                        field: 'partyActivistsSurveyTable',
                        title: '积极分子考察表',
                        formatter: function (value, row, index) {
                            return $.table.selectDictLabel(partyActivistsSurveyTableDatas, value);
                        }
                    },
	                {
		                field: 'partyActivistsEstablishmentDateDev',
		                title: '确立发展对象日期',
		                formatter: function (value, row, index) {
			                return changeDateFormat("yyyy-mm-dd", value);
		                }
	                },
	                {
		                field: 'partyActivistsPositionStuCadres',
		                title: '学生干部任职情况',
		                visible: false
	                },
	                {
		                field: 'partyActivistsRewardsPunishments',
		                title: '奖惩情况',
		                visible: false
	                },
                    {
                        field: 'partyActivistsHeadmaster',
                        title: '班主任'
                    },
                    {
                        field: 'partyActivistsContactInformation',
                        title: '联系方式'
                    },
                    {
                        field: 'partyActivistsRemarks',
                        title: '备注'
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function (value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.partyActivistsStuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                            actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.partyActivistsStuId + '\')"><i class="fa fa-remove"></i>删除</a>');
                            return actions.join('');
                        }
                    }]
            };
            $.table.init(options);
        });
    </script>

</body>
<!-- 导入区域 -->
<script id="importTpl" type="text/template">
    <form enctype="multipart/form-data" class="mt20 mb10">
        <div class="col-xs-offset-1">
            <input type="file" id="file" name="file"/>
            <div class="mt10 pt5">
                <input type="checkbox" id="updateSupport" name="updateSupport" title="如果登录账户已经存在，更新这条数据。">
                是否更新已经存在的用户数据
                &nbsp; <a onclick="$.table.importTemplate()" class="btn btn-default btn-xs"><i
                    class="fa fa-file-excel-o"></i> 下载模板</a>
            </div>
            <font color="red" class="pull-left mt10">
                提示：仅允许导入“xls”或“xlsx”格式文件！
            </font>
        </div>
    </form>
</script>
</html>